<?php
header('Content-Type:text/html;charset=UTF-8');

@$kw=$_REQUEST['kw'];

$conn = mysqli_connect(SAE_MYSQL_HOST_M, SAE_MYSQL_USER, SAE_MYSQL_PASS,  SAE_MYSQL_DB, SAE_MYSQL_PORT);
$sql='SET NAMES UTF8';
mysqli_query($conn,$sql);

$output=[];
$sql="SELECT * FROM mm_product WHERE pname LIKE '%$kw%'";
$result=mysqli_query($conn,$sql);

if(!$result){
		echo "<li>sql语法错误：$sql</li>";
	}else{
		$html="";
		while(($row=mysqli_fetch_assoc($result))!==null){
            $html.="<li><a>$row[pname]</a></li>";
		}
		echo $html;
	}

?>